//
//  MyVersionTool.m
//  MyMiss
//
//  Created by Mac on 16/3/5.
//  Copyright © 2016年 Mac. All rights reserved.
//

#import "YJVersionTool.h"

@implementation YJVersionTool
+ (void)showGuideView:(void (^)())Myblock
{
    NSDictionary *infoDict = [NSBundle mainBundle].infoDictionary;
    NSString *currentVersion = infoDict[@"CFBundleShortVersionString"];
    NSString *oldVersion = [[NSUserDefaults standardUserDefaults] stringForKey:@"version"];
    
    if (![currentVersion isEqualToString:oldVersion])
    {
        if (Myblock)
            Myblock();
        
        [[NSUserDefaults standardUserDefaults] setValue:currentVersion forKey:@"version"];
        [[NSUserDefaults standardUserDefaults] synchronize];
    }
}
@end
